package cn.rtangyy.seckilling.service;

import cn.rtangyy.seckilling.entity.SeckillGoods;

public interface SeckillGoodsService {
    SeckillGoods findByGoodsId(Long goodsId);

    /**
     * 通过 Id 修改秒杀商品
     * @param seckillGoods
     */
    void updateById(SeckillGoods seckillGoods);

    /**
     * 当库存不为零时，插入订单
     * @param seckillGoods
     */
    boolean updateByIdPositiveStock(SeckillGoods seckillGoods);
}
